// pages/wuliurongqiguanli/nav_check_gzcbl/check_gzcbl.js
const mybehavior = require("../../../../../behaviors/requests")
Page({

  /**
   * 页面的初始数据
   */
  behaviors: [mybehavior],
  data: {

    baseUrl: "https://logisticsengineering.gree.com/package_integrated_api/diy_frock_manage",
    list: [
      {
        v1: "1",
        v2: "C01531316",
        v3: "油分钣金件",
        v4: "08-09 09:02",
        v5: false
      },
      {
        v1: "2",
        v2: "C01531316",
        v3: "油分钣金件",
        v4: "08-09 09:02",
        v5: false
      },
    ],
    btn_type: "default",
    btn_type1: "danger",
    checked: false
  },
  onChange(e) {
    console.log(e.currentTarget.dataset.row_data);
    let row = e.currentTarget.dataset.row_data
    let lists = JSON.parse(JSON.stringify(this.data.list));
    lists[row.v1 - 1].v5 = !lists[row.v1 - 1].v5
    this.setData({
      list: lists
    })
  },
  btn1() {
    let type = this.data.btn_type
    if (type != "danger") {
      this.setData({
        btn_type: "danger",
        btn_type1: "default",
      })
      console.log("在叫料");
      wx.redirectTo({
        url: '/packageB/pages/package/lvkon/jiaoliao/jiaoliao',
      })
    }

  },
  btn2() {
    let type = this.data.btn_type1
    if (type != "danger") {
      this.setData({
        btn_type1: "danger",
        btn_type: "default",
      })
      console.log("已叫料");
      wx.redirectTo({
        url: '/packageB/pages/package/lvkon/yijiaoliao/yijiaoliao',
      })
    }

  },



  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})